package com.bbs.detai1713.dao;

import com.bbs.detai1713.dao.entity.*;
import com.bbs.detai1713.model.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface PostingMapper {
    List<TPosting> selectPosting(SelectPosting selectedPosting);

    int createPosting(CreatePosting createPosting);

    int deletePosting(DeletePosting deletePosting);

    int deleteFloorPosting(DeleteFloorPosting deleteFloorPosting);

    int replyPosting(ReplyPosting replyPosting);

    int movePosting(MovePosting movePosting);

    int countPosting(int boardId, int userId);

    List<TReply> selectReply(int page, Integer postingId);

    TPosting selectPostingByPostingId(Integer postingId);

    int countReply(long postingId);

    int createFloor(long postingId);

    int updateFloorUp1(long postingId);

    int selectFloor(long postingId);

    List<TSelectUserReply> selectUserReply(long userId);

    List<TSelectOtherReply> selectOtherReply(long userId);

    TSelectReplyByReplyId selectReplyByReplyId(long replyId);
}
